package io.renren.modules.manage.constant;

/**
 * @Author: linbd
 * @Description:
 * @Date: 2024/4/12 1:08
 */
public enum StateEnum {
    UN_PAY(1, "未支付"),
    PAYED(2, "已支付"),
    TRANSPORT(3,"配送中"),
    ARRIVE(4,"已送达"),
    RECEIVED(5,"已收货"),
    CANCEL(6,"已取消");

    StateEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static StateEnum getEnumByCode(int code) {
        for (StateEnum value : StateEnum.values()) {
            if (value.code == code) {
                return value;
            }
        }
        return null;
    }

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
